var journeyChart;
var delayArray = new Array();

$(document).ready(function(){  
    drawJourney();
})

function addToArray(delay) {
    delayArray.push(delay);
}

function drawJourney() {
    delayArray.pop();
      journeyChart = new Highcharts.Chart({
         chart: {
            renderTo: 'diagramContainer',
            type: 'column'
         },
         title: {
            text: ''
         },
         xAxis: {
            categories: []
         },
         yAxis: {
            title: {
               text: 'Försening (min)'
            }
         },   
         series: [{
            name: 'Spårvagn 1',
            data: delayArray
         }]
      });
}
   







